package com.iknow.xmpp.service.aidl;

import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import android.os.RemoteException;
import com.iknow.xmpp.service.Contact;
import java.util.ArrayList;
import java.util.List;

public abstract interface IChatManager
  implements IInterface
{
  public abstract void addChatCreationListener(IChatManagerListener paramIChatManagerListener)
    throws RemoteException;

  public abstract IChat createChat(Contact paramContact, IMessageListener paramIMessageListener)
    throws RemoteException;

  public abstract void deleteChatNotification(IChat paramIChat)
    throws RemoteException;

  public abstract void destroyChat(IChat paramIChat)
    throws RemoteException;

  public abstract IChat getChat(Contact paramContact)
    throws RemoteException;

  public abstract List<Contact> getOpenedChatList()
    throws RemoteException;

  public abstract void removeChatCreationListener(IChatManagerListener paramIChatManagerListener)
    throws RemoteException;

  public static abstract class Stub extends Binder
  implements IChatManager
  {
    private static final String DESCRIPTOR = "com.iknow.xmpp.service.aidl.IChatManager";
    static final int TRANSACTION_addChatCreationListener = 5;
    static final int TRANSACTION_createChat = 1;
    static final int TRANSACTION_deleteChatNotification = 4;
    static final int TRANSACTION_destroyChat = 3;
    static final int TRANSACTION_getChat = 2;
    static final int TRANSACTION_getOpenedChatList = 7;
    static final int TRANSACTION_removeChatCreationListener = 6;

    public Stub()
    {
      attachInterface(this, "com.iknow.xmpp.service.aidl.IChatManager");
    }

    public static IChatManager asInterface(IBinder paramIBinder)
    {
      Object localObject;
      if (paramIBinder == null)
        localObject = null;
      while (true)
      {
        while (true)
        {
          return localObject;
          IInterface localIInterface = paramIBinder.queryLocalInterface("com.iknow.xmpp.service.aidl.IChatManager");
          if ((localIInterface == null) || (!(localIInterface instanceof IChatManager)))
            break;
          localObject = (IChatManager)localIInterface;
        }
        localObject = new Proxy(paramIBinder);
      }
    }

    public IBinder asBinder()
    {
      return this;
    }

    public boolean onTransact(int paramInt1, Parcel paramParcel1, Parcel paramParcel2, int paramInt2)
      throws RemoteException
    {
      boolean bool;
      switch (paramInt1)
      {
      default:
        bool = super.onTransact(paramInt1, paramParcel1, paramParcel2, paramInt2);
      case 1598968902:
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
      case 6:
      case 7:
      }
      while (true)
      {
        while (true)
        {
          while (true)
          {
            while (true)
            {
              while (true)
              {
                label180: Contact localContact1;
                IBinder localIBinder1;
                Contact localContact2;
                IBinder localIBinder2;
                while (true)
                {
                  return bool;
                  paramParcel2.writeString("com.iknow.xmpp.service.aidl.IChatManager");
                  bool = true;
                }
                paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IChatManager");
                if (paramParcel1.readInt() != 0)
                {
                  localContact2 = (Contact)Contact.CREATOR.createFromParcel(paramParcel1);
                  IChat localIChat2 = createChat(localContact2, IMessageListener.Stub.asInterface(paramParcel1.readStrongBinder()));
                  paramParcel2.writeNoException();
                  if (localIChat2 == null)
                    break label180;
                  localIBinder2 = localIChat2.asBinder();
                }
                while (true)
                {
                  while (true)
                  {
                    while (true)
                    {
                      paramParcel2.writeStrongBinder(localIBinder2);
                      bool = true;
                    }
                    localContact2 = null;
                  }
                  localIBinder2 = null;
                }
                paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IChatManager");
                if (paramParcel1.readInt() != 0)
                {
                  localContact1 = (Contact)Contact.CREATOR.createFromParcel(paramParcel1);
                  IChat localIChat1 = getChat(localContact1);
                  paramParcel2.writeNoException();
                  if (localIChat1 == null)
                    break label257;
                  localIBinder1 = localIChat1.asBinder();
                }
                while (true)
                {
                  while (true)
                  {
                    while (true)
                    {
                      paramParcel2.writeStrongBinder(localIBinder1);
                      bool = true;
                    }
                    localContact1 = null;
                  }
                  label257: localIBinder1 = null;
                }
                paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IChatManager");
                destroyChat(IChat.Stub.asInterface(paramParcel1.readStrongBinder()));
                paramParcel2.writeNoException();
                bool = true;
              }
              paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IChatManager");
              deleteChatNotification(IChat.Stub.asInterface(paramParcel1.readStrongBinder()));
              paramParcel2.writeNoException();
              bool = true;
            }
            paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IChatManager");
            addChatCreationListener(IChatManagerListener.Stub.asInterface(paramParcel1.readStrongBinder()));
            paramParcel2.writeNoException();
            bool = true;
          }
          paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IChatManager");
          removeChatCreationListener(IChatManagerListener.Stub.asInterface(paramParcel1.readStrongBinder()));
          paramParcel2.writeNoException();
          bool = true;
        }
        paramParcel1.enforceInterface("com.iknow.xmpp.service.aidl.IChatManager");
        List localList = getOpenedChatList();
        paramParcel2.writeNoException();
        paramParcel2.writeTypedList(localList);
        bool = true;
      }
    }

    private static class Proxy
  implements IChatManager
    {
      private IBinder mRemote;

      Proxy(IBinder paramIBinder)
      {
        this.mRemote = paramIBinder;
      }

      // ERROR //
      public void addChatCreationListener(IChatManagerListener paramIChatManagerListener)
        throws RemoteException
      {
        // Byte code:
        //   0: invokestatic 28	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   3: astore_2
        //   4: invokestatic 28	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   7: astore_3
        //   8: aload_2
        //   9: ldc 30
        //   11: invokevirtual 34	android/os/Parcel:writeInterfaceToken	(Ljava/lang/String;)V
        //   14: aload_1
        //   15: ifnull +44 -> 59
        //   18: aload_1
        //   19: invokeinterface 40 1 0
        //   24: astore 5
        //   26: aload_2
        //   27: aload 5
        //   29: invokevirtual 43	android/os/Parcel:writeStrongBinder	(Landroid/os/IBinder;)V
        //   32: aload_0
        //   33: getfield 18	com/iknow/xmpp/service/aidl/IChatManager$Stub$Proxy:mRemote	Landroid/os/IBinder;
        //   36: iconst_5
        //   37: aload_2
        //   38: aload_3
        //   39: iconst_0
        //   40: invokeinterface 49 5 0
        //   45: pop
        //   46: aload_3
        //   47: invokevirtual 52	android/os/Parcel:readException	()V
        //   50: aload_3
        //   51: invokevirtual 55	android/os/Parcel:recycle	()V
        //   54: aload_2
        //   55: invokevirtual 55	android/os/Parcel:recycle	()V
        //   58: return
        //   59: aconst_null
        //   60: astore 5
        //   62: goto -36 -> 26
        //   65: astore 4
        //   67: aload_3
        //   68: invokevirtual 55	android/os/Parcel:recycle	()V
        //   71: aload_2
        //   72: invokevirtual 55	android/os/Parcel:recycle	()V
        //   75: aload 4
        //   77: athrow
        //
        // Exception table:
        //   from	to	target	type
        //   8	50	65	finally
      }

      public IBinder asBinder()
      {
        return this.mRemote;
      }

      public IChat createChat(Contact paramContact, IMessageListener paramIMessageListener)
        throws RemoteException
      {
        IBinder localIBinder;
        Parcel localParcel1 = Parcel.obtain();
        Parcel localParcel2 = Parcel.obtain();
        try
        {
          localParcel1.writeInterfaceToken("com.iknow.xmpp.service.aidl.IChatManager");
          if (paramContact != null)
          {
            localParcel1.writeInt(1);
            paramContact.writeToParcel(localParcel1, 0);
            if (paramIMessageListener == null)
              break label112;
            localIBinder = paramIMessageListener.asBinder();
            localParcel1.writeStrongBinder(localIBinder);
            this.mRemote.transact(1, localParcel1, localParcel2, 0);
            label112: localParcel2.readException();
          }
        }
        finally
        {
          while (true)
          {
            IChat localIChat;
            localParcel2.recycle();
            localParcel1.recycle();
            throw localObject;
            localIBinder = null;
          }
        }
      }

      // ERROR //
      public void deleteChatNotification(IChat paramIChat)
        throws RemoteException
      {
        // Byte code:
        //   0: invokestatic 28	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   3: astore_2
        //   4: invokestatic 28	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   7: astore_3
        //   8: aload_2
        //   9: ldc 30
        //   11: invokevirtual 34	android/os/Parcel:writeInterfaceToken	(Ljava/lang/String;)V
        //   14: aload_1
        //   15: ifnull +44 -> 59
        //   18: aload_1
        //   19: invokeinterface 84 1 0
        //   24: astore 5
        //   26: aload_2
        //   27: aload 5
        //   29: invokevirtual 43	android/os/Parcel:writeStrongBinder	(Landroid/os/IBinder;)V
        //   32: aload_0
        //   33: getfield 18	com/iknow/xmpp/service/aidl/IChatManager$Stub$Proxy:mRemote	Landroid/os/IBinder;
        //   36: iconst_4
        //   37: aload_2
        //   38: aload_3
        //   39: iconst_0
        //   40: invokeinterface 49 5 0
        //   45: pop
        //   46: aload_3
        //   47: invokevirtual 52	android/os/Parcel:readException	()V
        //   50: aload_3
        //   51: invokevirtual 55	android/os/Parcel:recycle	()V
        //   54: aload_2
        //   55: invokevirtual 55	android/os/Parcel:recycle	()V
        //   58: return
        //   59: aconst_null
        //   60: astore 5
        //   62: goto -36 -> 26
        //   65: astore 4
        //   67: aload_3
        //   68: invokevirtual 55	android/os/Parcel:recycle	()V
        //   71: aload_2
        //   72: invokevirtual 55	android/os/Parcel:recycle	()V
        //   75: aload 4
        //   77: athrow
        //
        // Exception table:
        //   from	to	target	type
        //   8	50	65	finally
      }

      // ERROR //
      public void destroyChat(IChat paramIChat)
        throws RemoteException
      {
        // Byte code:
        //   0: invokestatic 28	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   3: astore_2
        //   4: invokestatic 28	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   7: astore_3
        //   8: aload_2
        //   9: ldc 30
        //   11: invokevirtual 34	android/os/Parcel:writeInterfaceToken	(Ljava/lang/String;)V
        //   14: aload_1
        //   15: ifnull +44 -> 59
        //   18: aload_1
        //   19: invokeinterface 84 1 0
        //   24: astore 5
        //   26: aload_2
        //   27: aload 5
        //   29: invokevirtual 43	android/os/Parcel:writeStrongBinder	(Landroid/os/IBinder;)V
        //   32: aload_0
        //   33: getfield 18	com/iknow/xmpp/service/aidl/IChatManager$Stub$Proxy:mRemote	Landroid/os/IBinder;
        //   36: iconst_3
        //   37: aload_2
        //   38: aload_3
        //   39: iconst_0
        //   40: invokeinterface 49 5 0
        //   45: pop
        //   46: aload_3
        //   47: invokevirtual 52	android/os/Parcel:readException	()V
        //   50: aload_3
        //   51: invokevirtual 55	android/os/Parcel:recycle	()V
        //   54: aload_2
        //   55: invokevirtual 55	android/os/Parcel:recycle	()V
        //   58: return
        //   59: aconst_null
        //   60: astore 5
        //   62: goto -36 -> 26
        //   65: astore 4
        //   67: aload_3
        //   68: invokevirtual 55	android/os/Parcel:recycle	()V
        //   71: aload_2
        //   72: invokevirtual 55	android/os/Parcel:recycle	()V
        //   75: aload 4
        //   77: athrow
        //
        // Exception table:
        //   from	to	target	type
        //   8	50	65	finally
      }

      public IChat getChat(Contact paramContact)
        throws RemoteException
      {
        IChat localIChat;
        Parcel localParcel1 = Parcel.obtain();
        Parcel localParcel2 = Parcel.obtain();
        try
        {
          localParcel1.writeInterfaceToken("com.iknow.xmpp.service.aidl.IChatManager");
          if (paramContact != null)
          {
            localParcel1.writeInt(1);
            paramContact.writeToParcel(localParcel1, 0);
            this.mRemote.transact(2, localParcel1, localParcel2, 0);
            localParcel2.readException();
            localIChat = IChat.Stub.asInterface(localParcel2.readStrongBinder());
            localParcel2.recycle();
            localParcel1.recycle();
          }
        }
        finally
        {
          localParcel2.recycle();
          localParcel1.recycle();
        }
      }

      public String getInterfaceDescriptor()
      {
        return "com.iknow.xmpp.service.aidl.IChatManager";
      }

      public List<Contact> getOpenedChatList()
        throws RemoteException
      {
        Parcel localParcel1 = Parcel.obtain();
        Parcel localParcel2 = Parcel.obtain();
        try
        {
          localParcel1.writeInterfaceToken("com.iknow.xmpp.service.aidl.IChatManager");
          this.mRemote.transact(7, localParcel1, localParcel2, 0);
          localParcel2.readException();
          ArrayList localArrayList = localParcel2.createTypedArrayList(Contact.CREATOR);
          return localArrayList;
        }
        finally
        {
          localParcel2.recycle();
          localParcel1.recycle();
        }
      }

      // ERROR //
      public void removeChatCreationListener(IChatManagerListener paramIChatManagerListener)
        throws RemoteException
      {
        // Byte code:
        //   0: invokestatic 28	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   3: astore_2
        //   4: invokestatic 28	android/os/Parcel:obtain	()Landroid/os/Parcel;
        //   7: astore_3
        //   8: aload_2
        //   9: ldc 30
        //   11: invokevirtual 34	android/os/Parcel:writeInterfaceToken	(Ljava/lang/String;)V
        //   14: aload_1
        //   15: ifnull +45 -> 60
        //   18: aload_1
        //   19: invokeinterface 40 1 0
        //   24: astore 5
        //   26: aload_2
        //   27: aload 5
        //   29: invokevirtual 43	android/os/Parcel:writeStrongBinder	(Landroid/os/IBinder;)V
        //   32: aload_0
        //   33: getfield 18	com/iknow/xmpp/service/aidl/IChatManager$Stub$Proxy:mRemote	Landroid/os/IBinder;
        //   36: bipush 6
        //   38: aload_2
        //   39: aload_3
        //   40: iconst_0
        //   41: invokeinterface 49 5 0
        //   46: pop
        //   47: aload_3
        //   48: invokevirtual 52	android/os/Parcel:readException	()V
        //   51: aload_3
        //   52: invokevirtual 55	android/os/Parcel:recycle	()V
        //   55: aload_2
        //   56: invokevirtual 55	android/os/Parcel:recycle	()V
        //   59: return
        //   60: aconst_null
        //   61: astore 5
        //   63: goto -37 -> 26
        //   66: astore 4
        //   68: aload_3
        //   69: invokevirtual 55	android/os/Parcel:recycle	()V
        //   72: aload_2
        //   73: invokevirtual 55	android/os/Parcel:recycle	()V
        //   76: aload 4
        //   78: athrow
        //
        // Exception table:
        //   from	to	target	type
        //   8	51	66	finally
      }
    }
  }
}